package com.erp.dto;

import com.erp.domain.TDepartment;

public class Department implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;
	private String name;
	private Integer level;
	private Integer parentId;
	private String description;

	public Department() {
	}

	public Department(TDepartment TDepartment) {
		this.id = TDepartment.getId();
		this.name = TDepartment.getName();
		this.level = TDepartment.getLevel();
		this.description = TDepartment.getDescription();
		TDepartment pTDepartment = TDepartment.getParent();
		if (pTDepartment != null) {
			this.parentId = pTDepartment.getId();
		}
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}